package com.company.aicrawlers.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.company.aicrawlers.entity.AnalysisProductDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 商品分析详情Mapper
 *
 * @author AI Crawlers Team
 * @date 2025-10-11
 */
@Mapper
public interface AnalysisProductDetailMapper extends BaseMapper<AnalysisProductDetail> {

    /**
     * 根据分析ID查询商品列表
     */
    List<AnalysisProductDetail> getByAnalysisId(@Param("analysisId") Long analysisId);

    /**
     * 根据分析ID和商品ID查询详情
     */
    AnalysisProductDetail getByAnalysisIdAndProductId(
            @Param("analysisId") Long analysisId,
            @Param("productId") Long productId);

    /**
     * 批量插入
     */
    int batchInsert(@Param("list") List<AnalysisProductDetail> list);
}

